﻿using Core.Caching;

namespace Core.Identity.Organizations.Caching;

public static class OrganizationsCacheKey
{
    public const string GetAllCacheKey = "all-organizations";

    public static string GetOrganizationsById(string? parameters)
    {
        return $"OrganizationsCacheKey:GetOrganizationsById,{parameters}";
    }

    public static string GetPaginationCacheKey(string parameters)
    {
        return $"OrganizationsCacheKey:OrganizationsWithPaginationQuery,{parameters}";
    }

    public static IEnumerable<string>? Tags => ["Organization"];

    public static void Refresh()
    {
        CacheFactory.RemoveByTags(Tags);
    }
}
